import request from '@/utils/request'

// 查询新闻快讯列表
export function listFlashnews(query) {
  return request({
    url: '/business/flashnews/list',
    method: 'get',
    params: query
  })
}

// 查询新闻快讯详细
export function getFlashnews(id) {
  return request({
    url: '/business/flashnews/' + id,
    method: 'get'
  })
}

// 新增新闻快讯
export function addFlashnews(data) {
  return request({
    url: '/business/flashnews',
    method: 'post',
    data: data
  })
}

// 修改新闻快讯
export function updateFlashnews(data) {
  return request({
    url: '/business/flashnews',
    method: 'put',
    data: data
  })
}

// 删除新闻快讯
export function delFlashnews(id) {
  return request({
    url: '/business/flashnews/' + id,
    method: 'delete'
  })
}
